package com.tiger.cloud.enums;

import com.tiger.cloud.common.mybatis.handler.CodeEnum;

public enum AppSmsType implements CodeEnum<AppSmsType> {

	VERIF_CODE(1, "验证码"), AUDIT(2, "审核短信"), AUDITED(3, "审核通过"), UN_AUDITED(4, "审核未通过");

	private int code;
	private String desc;

	/**
     * 通过枚举<code>name</code>获取枚举
     */
    public static AppSmsType getEnumByCode(Integer code) {
    	if(code==null){
    		return null;
    	}
        for (AppSmsType enumm : AppSmsType.values()) {
            if (enumm.getCode()==code.intValue()) {
                return enumm;
            }
        }
        return null;
    }
	
	private AppSmsType(int code, String desc) {
		this.code = code;
		this.desc=desc;
	}

	@Override
	public int getCode() {
		return code;
	}

	public String getDesc() {
		return desc;
	}
	
}
